# Contributor: Oleg Titov <oleg.titov@gmail.com>
# Maintainer: Oleg Titov <oleg.titov@gmail.com>
pkgname=py3-cymem
pkgver=2.0.3
pkgrel=0
pkgdesc="Cython memory pool for RAll-style memory management"
url="https://github.com/explosion/cymem"
arch="all"
license="MIT"
depends="python3"
makedepends="python3-dev py3-setuptools cython"
checkdepends="py3-pytest"
subpackages="$pkgname-doc"
source="cymem-$pkgver.tar.gz::https://github.com/explosion/cymem/archive/v$pkgver.tar.gz"
builddir="$srcdir/cymem-$pkgver"

build() {
	python3 setup.py build
}

check() {
	PYTHONPATH="$(echo $PWD/build/lib.*)" pytest-3
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"

	install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
}

sha512sums="e80f1af0be0399c93e9dbddb9c132513ca3e17b14337662097cb36edf606fb7fd0a490d348d44d3f905aa274a9c8f6a5a8008099d0814c0a462775d357bdae26  cymem-2.0.3.tar.gz"
